﻿/**
 * 
 * @file FITKSEASubSysAbsShell.h
 * @brief SEA板子系统 抽象类
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-10-06
 * 
 */
#ifndef _FITKSEASUBSYS_ABS__SHELL__H___
#define _FITKSEASUBSYS_ABS__SHELL__H___

#include "FITKAbstractSEASubSysWithNodes.h" 
#include "FITKSEASubSysShellRadiationWare.h"
//#include "FITKFlatPlateFace.h"

 
namespace Acoustics
{
 
    class FITKAcousticsTriangles;
    class FITKAcousticsAbstractSpectra;
    class FITKAcousticsAbsNCT;
     /**
      * @brief 板子系统定义
      * @author LiBaojun (libaojunqd@foxmail.com)
      * @date 2024-10-06
      */
    class FITKAcousticsModelAPI FITKAbstractSEASubSysShell : 
        public FITKAbstractSEASubSysWithNodes, public FITKSEASubSysShellRadiationWare
    {
        FITKCLASS(Acoustics, FITKAbstractSEASubSysShell);
    public:
       /**
        * @brief Construct a new FITKAbstractSEASubSysShell object
        * @param[i]  是否从FE模型创建
        * @author LiBaojun (libaojunqd@foxmail.com)
        * @date 2024-10-06
        */
        explicit FITKAbstractSEASubSysShell();
        /**
         * @brief Destroy the FITKAbstractSEASubSysShell object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-06
         */
        virtual ~FITKAbstractSEASubSysShell();
        /**
         * @brief 获取三角形列表
         * @return FITKAcousticsTriangles* 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-06
         */
        FITKAcousticsTriangles* getTriangleMesh();
        /**
       * @brief 获取三角形使用的节点ID
       * @return QList<int>
       * @author LiBaojun (libaojunqd@foxmail.com)
       * @date 2024-11-19
       */
        virtual QList<int> getTriangleNodeIDs() override;
        /**
         * @brief    获取弯曲波频谱
         * @return   int     弯曲波频谱id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        int getFlexureSpectraID();
        /**
         * @brief    获取弯曲波频谱
         * @return   FITKAcousticsAbstractSpectra*   弯曲波频谱
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        FITKAcousticsAbstractSpectra* getFlexureSpectra();
        /**
         * @brief    设置弯曲波
         * @param[i] id       弯曲波频谱id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        void setFlexureSpectraID(int id);
        /**
         * @brief    获取拉伸波频谱
         * @return   int     拉伸波频谱id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        int getExtensionSpectraID();
        /**
         * @brief    获取拉伸波频谱
         * @return   FITKAcousticsAbstractSpectra*  拉伸波频谱
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        FITKAcousticsAbstractSpectra* getExtensionSpectra();
        /**
         * @brief    设置拉伸波频谱
         * @param[i] id      拉伸波频谱id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        void setExtensionSpectraID(int id);
        /**
         * @brief    获取剪切波频谱
         * @return   int     剪切波频谱id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        int getShearSpectraID();
        /**
         * @brief    获取剪切波频谱
         * @return   FITKAcousticsAbstractSpectra*   剪切波频谱
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        FITKAcousticsAbstractSpectra* getShearSpectra();
        /**
         * @brief    设置剪切波频谱
         * @param[i] id      剪切波频谱id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-04
         */
        void setShearSpectraID(int id);
        /**
         * @brief    数据对象只有节点数据时，必须要更新三角网格
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-06
         */
        virtual bool updateTriMesh() = 0;
        /**
         * @brief    数据对象没有数据，需要通过FE模型获取数据时，更新三角网格
         * @param[i] faceMeshData partID, 表面单元ID
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-18
         */
        virtual bool updateTriMesh(QHash<int, QList<int>> faceMeshData);
        /**
         * @brief    设置是否使用来自用户光谱的开启状态
         * @param[i] state 设置开启状态
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setFromUserSpectraState(bool state);
        /**
         * @brief    设置是否使用来自物理属性的开启状态
         * @param[i] state 设置开启状态
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setFromPhysicalPropState(bool state);
        /**
         * @brief    设置是否使用来自噪声控制的开启状态
         * @param[i] state 设置开启状态
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setFromNoiseControlState(bool state);
        /**
         * @brief    获取来自用户光谱开启状态
         * @return   bool 开启状态：true 开启 false 关闭
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        bool getFromUserSpectraState();
        /**
         * @brief    获取来自物理属性开启状态
         * @return   bool 开启状态：true 开启 false 关闭
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        bool getFromPhysicalPropState();
        /**
         * @brief    获取来自噪声控制开启状态
         * @return   bool 开启状态：true 开启 false 关闭
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        bool getFromNoiseControlState();
        /**
         * @brief    设置外部声学包
         * @param[i] id 声学包id
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setOutsideNCTID(int id);
        /**
         * @brief    获取外部声学包
         * @return   int 声学包id
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        int getOutsideNCTID();
        /**
         * @brief    获取外部声学包
         * @return   FITKAcousticsAbsNCT *
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        FITKAcousticsAbsNCT* getOutsideNCT();
        /**
         * @brief    设置内部声学包
         * @param[i] id 声学包id
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setInsideNCTID(int id);
        /**
         * @brief    获取内部声学包
         * @return   int 声学包id
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        int getInsideNCTID();
        /**
         * @brief    获取内部声学包
         * @return   FITKAcousticsAbsNCT *
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        FITKAcousticsAbsNCT* getInsideNCT();
        /**
         * @brief    设置外部声学包覆盖率
         * @param[i] percentage 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setOutsideNCTCoveredArea(double percentage);
        /**
         * @brief    获取外部声学包覆盖率
         * @return   double
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        double getOutsideNCTCoveredArea();
        /**
         * @brief    设置内部声学包覆盖率
         * @param[i] percentage 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void setInsideNCTCoveredArea(double percentage);
        /**
         * @brief    获取内部声学包覆盖率
         * @return   double
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        double getInsideNCTCoveredArea();
     protected:
        /**
        * @brief 更新局部坐标系
        * @return bool
        * @author LiBaojun (libaojunqd@foxmail.com)
        * @date 2024-11-13
        */
        virtual bool updateCoordinate() override;

    protected:
        /**
         * @brief  弯曲波频谱id
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-04
         */
        int _flexureSpectraID = -1;
        /**
         * @brief  拉伸波频谱id
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-04
         */
        int _extensionSpectraID = -1;
        /**
         * @brief  剪切波频谱id
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-04
         */
        int _shearSpectraID = -1;
        /**
         * @brief  来自用户光谱开启状态
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-06
         */
        bool _fromUserSpectraState{ true };
        /**
         * @brief  来自物理属性开启状态
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-06
         */
        bool _fromPhysicalPropState{ false };
        /**
         * @brief  来自噪声控制开启状态
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-06
         */
        bool _fromNoiseControlState{ false };
    };

}


#endif
